Fix show-next-page problem with mult events
authorjustbur <justin@burkett.cc>
Sat, 25 Jul 2015 14:19:24 +0000 (10:19 -0400)
committerjustbur <justin@burkett.cc>
Sat, 25 Jul 2015 14:19:24 +0000 (10:19 -0400)
Need to add (t . event) to unread-command-events to force emacs to add
each event to the current command's sequence. See docs for
unread-command-events.

which-key.el

index 2d49e62f13d86db4f6f2c254775b662d0b7c1c08..32cf4e3b58a1e38db2c22f6cfee6ec73031e2057 100644 (file)
@@ -1003,7 +1003,9 @@ enough space based on your settings and frame size." prefix-keys)
                        (1+ which-key--current-page-n) 0)))
     (which-key--stop-timer)
     (setq unread-command-events
-          (listify-key-sequence which-key--current-prefix))
+          ;; forces event into current key sequence
+          (mapcar (lambda (ev) (cons t ev))
+                  (listify-key-sequence which-key--current-prefix)))
     (if which-key--last-try-2-loc
         (let ((which-key-side-window-location which-key--last-try-2-loc))
           (which-key--show-page next-page))